package com.example.iotdb;



import com.example.iotdb.config.IotDBSessionConfig;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;


/**
 * @Description :
 * @Author : Bruce Lee
 * @CreateTime : 2023/12/6
 */

@Component
public class IotTest {
    @Autowired
    private IotDBSessionConfig iotDBSessionConfig;

    public void func() {

        StringBuffer tableName = new StringBuffer();
        tableName.append("root").append(".").append("test").append("deviceid");

        long currentTime = System.currentTimeMillis();

        List<String> iotMeasurements = new ArrayList<>();
        iotMeasurements.add("aaa");
        iotMeasurements.add("bbb");

        List<String> iotValues = new ArrayList<>();
        iotValues.add("123");
        iotValues.add("abide");

        iotDBSessionConfig.insertRecord(tableName.toString(), currentTime, iotMeasurements, iotValues);


    }


}
